home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AppleScript - The Beta Release
/
AppleScript - The Beta Release.iso
/
Developer Scripts
/
Excel 4.0 AS Examples
/
Demos
/
Create Chart
< prev
Wrap
Text File
|
1992-11-25
|
680b
|
26 lines
tell application "Microsoft Excel"
-- Set up variables
set chartinfo to {{"", "Cars", "Trucks", "Buses"}, {1991, 1, 2, 3}, {1992, 4, 5, 6}, {1992, 7, 8, 9}}
set charttitle to "Annual Sales"
set charttype to three D column
set chartlegend to true
-- Now do the work
make document
set Range "R1C1:R4C4" of first document to chartinfo
set selection of first document to Range "R1C1:R4C4"
make Chart
set type of first Chart to charttype
set title of first Chart to charttitle
set has legend of first Chart to chartlegend
copy first Chart to finalchart
close first document saving no
close first document saving no
-- Get the result
get finalchart
end tell